package com.android.wellcherish.workclock.view;

import android.content.Context;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.TextView;
import com.android.wellcherish.workclock.R;
import com.android.wellcherish.workclock.bean.data.IBaseBean;
import com.android.wellcherish.workclock.bean.data.RecordAdapterContentBean;

/**
 * @author 张文琛
 * @date 2020/3/15 16:56
 */
public class RecordContentViewHolder extends RecordBaseViewHolder {
    public TextView tvContent;
    public TextView tvTime;

    public RecordContentViewHolder(@NonNull Context context, @NonNull View itemView) {
        super(context, itemView);
        tvContent = itemView.findViewById(R.id.tv_content);
        tvTime = itemView.findViewById(R.id.tv_time);
    }

    @Override
    public void onBindViewHolder(@NonNull IBaseBean baseBean, int position) {
        if(!(baseBean instanceof RecordAdapterContentBean)) {
            return;
        }
        RecordAdapterContentBean bean = (RecordAdapterContentBean) baseBean;
        tvContent.setText(bean.getContent());
        tvTime.setText(bean.getTime());
    }
}
